home *** CD-ROM | disk | FTP | other *** search
/ ADA Programming Guide / ADA Programming Guide.iso / ada_gnu / adainc / a-caldel.adb < prev    next >
Text File  |  1996-01-30  |  3KB  |  60 lines

  1. ------------------------------------------------------------------------------
  2. --                                                                          --
  3. --                 GNU ADA RUNTIME LIBRARY (GNARL) COMPONENTS               --
  4. --                                                                          --
  5. --                   A D A . C A L E N D A R . D E L A Y S                  --
  6. --                                                                          --
  7. --                                  B o d y                                 --
  8. --                                                                          --
  9. --                             $Revision: 1.10 $                             --
  10. --                                                                          --
  11. --       Copyright (c) 1991,1992,1993,1994, FSU, All Rights Reserved        --
  12. --                                                                          --
  13. -- GNARL is free software; you can redistribute it  and/or modify it  under --
  14. -- terms  of  the  GNU  Library General Public License  as published by the --
  15. -- Free Software  Foundation;  either version 2, or (at  your  option)  any --
  16. -- later  version.  GNARL is distributed  in the hope that  it will be use- --
  17. -- ful, but but WITHOUT ANY WARRANTY;  without even the implied warranty of --
  18. -- MERCHANTABILITY  or  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Gen- --
  19. -- eral Library Public License  for more details.  You should have received --
  20. -- a  copy of the GNU Library General Public License along with GNARL;  see --
  21. -- file COPYING.LIB.  If not,  write to the  Free Software Foundation,  675 --
  22. -- Mass Ave, Cambridge, MA 02139, USA.                                      --
  23. --                                                                          --
  24. ------------------------------------------------------------------------------
  25.  
  26. with System;
  27. --  Used for, Priority
  28.  
  29. with System.Task_Timer_Service;
  30. --  Used for, Timer
  31.  
  32. package body Ada.Calendar.Delays is
  33.  
  34.    ------------------
  35.    -- Delay_Object --
  36.    ------------------
  37.  
  38.    protected body Delay_Object is
  39.       entry Wait (T : Duration) when True is
  40.       begin
  41.          requeue System.Task_Timer_Service.Timer.Enqueue_Duration with abort;
  42.          --  ??? This should not need with abort.
  43.       end Wait;
  44.    end Delay_Object;
  45.  
  46.    ------------------------
  47.    -- Delay_Until_Object --
  48.    ------------------------
  49.  
  50.    protected body Delay_Until_Object is
  51.       entry Wait (T : Time) when True is
  52.       begin
  53.          requeue System.Task_Timer_Service.Timer.Enqueue_Calendar_Time
  54.            with abort;
  55.          --  ??? This should not need with abort.
  56.       end Wait;
  57.    end Delay_Until_Object;
  58.  
  59. end Ada.Calendar.Delays;
  60.